<?php

Zend_Loader::loadClass("Application_Page");
Zend_Loader::loadClass("Application_Form_Lex");
Zend_Loader::loadClass("Application_Menu_Lex");

class Application_Page_Lex extends Application_Page
{
    private $_leftCol;
    private $_rightCol;

    protected function _init()
    {
        Zend_Layout::getMvcInstance()->setLayout('liquido2');
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        $viewRenderer->view->headScript()->appendFile("/js/jquery-1.7.min.js");
        $viewRenderer->view->headScript()->appendFile("/js/jstree/jquery.jstree.js");
        parent::_init();
    }

    public function run()
    {
        // 1. Costruzione del menu di navigazione
        //    Gestione del nodo attivo
        // 2. Costruzione del form
        // 3. ...

        $prepForm = new Application_Form_Lex();
        $menuNav = new Application_Menu_Lex();

        $menuNav->run();

        Zend_Layout::getMvcInstance()->leftCol = $menuNav->render();
        Zend_Layout::getMvcInstance()->rightCol = $prepForm->render();

    }

}
